<?php
/**
 * Page to register a student
 */
?>
<?php require_once 'register_generic.php'; ?>
<script>
function setProfileId(id){
	//a bit of indirection so I don't have to change the login() method, sets the username and password to a couple of hidden fields, the login method then grabs the data from there
	$("#username").val(username);
	$("#password").val(password);	
	insertNewStudent(id, department_id, 2009, login);
}

var department_id;
function setDepartmentId(id){
	department_id = id;
}

</script>
<h1>Register as a student</h1>
<table>
<tr>
<th>Department:</th>
<td>
<?php
Department::print_Department_dropdown ( Department::getDepartments (), "department_name", "", "setDepartmentId" );
?>
</td>
</tr>
</table>

<?php 
//gets all the code necessary for registering the profile portion
getProfileRegistration(3);
?>
<br>
<br>
<a href="#register_instructor">Register as an instructor</a>
<br>
<a href="#register_admin">Register as an administrator</a>
<br>
<br>
<a href="#login">Login</a>